Skip to content

fix(server/resources): decode percent-encoded resource name from URI fragment#4003

Open
lucienlmy wants to merge 1 commit into
citizenfx:masterfrom
lucienlmy:patch-4
Open

fix(server/resources): decode percent-encoded resource name from URI fragment#4003
lucienlmy wants to merge 1 commit into
citizenfx:masterfrom
lucienlmy:patch-4

Conversation

@lucienlmy
Copy link
Copy Markdown

Resource names from URI fragments were not decoded back from
percent-encoding, causing non-ASCII resource names (e.g. Chinese)
to be registered as encoded strings like "%E8%B7%91%E9%85%B7".

This resulted in:

  • ensure <resource> unable to find resources with non-ASCII names
  • Garbled resource names in console warnings/errors

The path component already calls skyr::percent_decode(), but the
fragment (used as the resource name) was missing the same treatment.
Adding it makes the encode/decode cycle symmetric.

…fragment

Resource names from URI fragments were not decoded back from
percent-encoding, causing non-ASCII resource names (e.g. Chinese)
to be registered as encoded strings like "%E8%B7%91%E9%85%B7".

This resulted in:
- `ensure <resource>` unable to find resources with non-ASCII names
- Garbled resource names in console warnings/errors

The path component already calls `skyr::percent_decode()`, but the
fragment (used as the resource name) was missing the same treatment.
Adding it makes the encode/decode cycle symmetric.
@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label May 22, 2026
@yorick2002
Copy link
Copy Markdown
Contributor

Resource names from URI fragments were not decoded back from percent-encoding, causing non-ASCII resource names (e.g. Chinese) to be registered as encoded strings like "%E8%B7%91%E9%85%B7".

This resulted in:

* `ensure <resource>` unable to find resources with non-ASCII names

* Garbled resource names in console warnings/errors

The path component already calls skyr::percent_decode(), but the fragment (used as the resource name) was missing the same treatment. Adding it makes the encode/decode cycle symmetric.

You didnt use the PR template

@lucienlmy
Copy link
Copy Markdown
Author

Resource names from URI fragments were not decoded back from percent-encoding, causing non-ASCII resource names (e.g. Chinese) to be registered as encoded strings like "%E8%B7%91%E9%85%B7".
This resulted in:

* ``ensure <resource>`` unable 到 find resources 标签的内容,使用: non-ASCII names

* Garbled resource names in console warnings/errors

The path component already calls skyr::percent_decode(), but the fragment (used as the resource name) was missing the same treatment. Adding it makes the encode/decode cycle symmetric.

You didnt use the PR template

I submitted for the first time, where was the template?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants